1. Field of the Invention
The present invention relates to a variable length coding method, and more particularly, to a variable length coding method for dynamically varying the mapping relationship between a symbol and bit pattern, depending on the occurrence statistics of input symbols. The present invention also relates to a variable length coding apparatus for performing the variable length coding method. The present invention also relates to a variable length decoding method of decoding a bit pattern which has been coded by the variable length coding method. The present invention also relates to a variable length decoding apparatus for performing the variable length decoding method.
2. Description of the Related Art
Standardized video CODECs adopt a variable length coding (VLC) technique to obtain high coding efficiency. FIG. 1 shows a block diagram of a conventional variable length coding apparatus. Referring to FIG. 1, a variable length coder 10 receives a symbol and performs variable length coding based on a variable length coding table 12, in which each symbol is mapped onto a bit pattern of a different length based on average symbol statistics of usual test patterns.
However, the symbol statistics considerably vary depending on a video sequence and coding parameters. Accordingly, in a conventional variable length coding technology, it sometimes happens that a large number of bits is allocated to a symbol even if the symbol appears frequently. This causes a problem of decreasing the efficiency of compression of bits by variable length coding.
To solve this problem, a conventional method prepares a plurality of variable length coding tables and selects one among the prepared variable length coding tables based on the result of sorting a given video sequence according to coding parameters during coding. However, this method is disadvantageous in that it is difficult to sort a given sequence and that a bit rate cannot be efficiently reduced because the statistical characteristics of symbols vary even with the same coding parameters.